package com.struct.factory
{
	import com.collection.DataWorkerCollection;
	import com.struct.graph.loader.LoaderFrame;
	import com.struct.graph.loader.LoaderGraphWorker;
	
	import sacu.s.Factory;
	
	public class LoaderFactory extends Factory
	{
		public var loaderGW:LoaderGraphWorker;
		public var loader:LoaderFrame;
		
		private var command:String;
		public function LoaderFactory(Name:String)
		{
			super(Name);
		}
		override protected function onInitFactory():void{
			super.onInitFactory();
			loader = new LoaderFrame();
			loaderGW = new LoaderGraphWorker("LoaderGraphWorker", loader);
		}
		override protected function onStartFactory():void{
			SSA.application.limitLayer.addChild(loader);
			registerGraphicsWorker(loaderGW);
			registerDataWorker(DataWorkerCollection.zip);
		}
		override public function disposeFactory():void{
			super.disposeFactory();
			SSA.application.limitLayer.removeChild(loader);
			removeGraphicsWorker(loaderGW.eName);
			removeDataWorker(DataWorkerCollection.zip.eName);
		}
	}
}